<include file="Admin/Public/Header" />
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31">
			<div class="titlebt">
				<if condition="I('get.do')=='add'">
					添加栏目
				<else />
					修改栏目
				</if>
			</div>
		</td>
      </tr>
    </table>

<div class="main">

	<div class="form">
		<php>$do = I('get.do');</php>
		<form method='post' id="form_do" name="form_do" enctype="multipart/form-data" action="{:U('Admin/Category/category', 'do='.$do)}">

		<dl>
			<dt> 所属栏目：</dt>
			<dt>
				<if condition="$result.gc_id neq ''">
                    <div style="width:80px; background:#079B04; color:#FFFFFF" align="center">{$result.gc_name}</div>
                    <input type="hidden" name="lanmu" value="{$result.gc_id}">
                <else />
                    <div style="width:80px; background:#079B04; color:#FFFFFF" align="center">顶级分类</div>
                </if>
			</dt>
		</dl>

		<dl>
			<dt><span style="color:red;">*</span> 栏目名称：</dt>
			<dd>
				<input type="text" name="gc_name" class="inp_one" value="{$cate.gc_name}" />
			</dd>
		</dl>

        <dl>
            <dt>首字母</dt>
            <dd>
                <input type="text" name="firstname" value="{$cate.gc_firstname}" class="inp_one" placeholder="不填默认自动生成">
            </dd>
        </dl>

        <dl>
            <dt> 栏目关系：</dt>
            <if>
	            <span><volist name="result['goods_relation']" id="vo">{$vo.gc_name}></volist></span>
	            <input type="hidden" name="relation" class="inp_one" value="{$result.gc_relation}{$result.gc_id}"/>
            </dd>
        </dl>

		<dl>
			<dt> 排序：</dt>
			<dd>
				<input type="number" name="sort" class="inp_one" value="{$cate.gc_sort}" placeholder="默认值0"/>
			</dd>
		</dl>

        <dl>
            <dt> 图片上传：</dt>
            <dd>
                <input type="text" name="name" style="display: none;" /><input type="file" name="photo" />
                <if condition="$cate['gc_pic']"><div id="gallery" style="margin-left:140px;"><a class="photo" href="<php>echo 'http://'.$_SERVER['SERVER_NAME'];</php>/Application/Ucmaim/Uploads/{$cate.gc_pic}"><img src="<php>echo 'http://'.$_SERVER['SERVER_NAME'];</php>/Application/Ucmaim/Uploads/{$cate.gc_pic}" width="200" height="100"></a></div></if>
            </dd>
        </dl>

		<div class="form_b">
            <input type="hidden" value="{$id}" name="id">
			<input type="submit" class="btn_blue" id="submit" value="提 交">
		</div>
	   </form>
	</div>
</div>
<script src="__ADMIN__/js/jquery.poptrox.min.js"></script>
<script>$(function(){$('#gallery').poptrox({usePopupCaption:true})});</script>
<include file="Admin/Public/Copyright" />
</body>
</html>
